remotemanager.connection.computers.substitution module¶
- class remotemanager.connection.computers.substitution.Substitution(target: str, name: str, mode: str | None = None, **kwargs)[source]¶
Stores a jobscript template substitution
- Parameters:
target – String to _replace_ in the template. Ideally should begin with a commenting character (#)
name – String to replace _with_. At script generation, target will be replaced with name
mode – Used by JUBETemplate
Note
For other args see the DynamicMixin class
- classmethod from_string(string: str, warn_invalid: bool = True, **kwargs) Substitution [source]¶
Create a substitution object from template string
- Parameters:
string (str) – Input string to generate from
warn_invalid (bool) – Invalid args name, target will be deleted. Warn if True
kwargs – Any keyword args to override the string with
- property target_kwargs¶
Attempts to extract the kwargs from the target string
- property value: Any¶
Returns: value if present, else default
- property arg: str¶
Returns: Argument which is exposed to the underlying URL for setting
- property entrypoint: str¶
Returns the name/name for this sub